package com.foreknow.demo15;

/**
 * 字符串工具类常用方法
 */
public class UtilDemo {
    public static void main(String[] args) {
//        String str = "     ads         ";
//        System.out.println(str.trim());
//        System.out.println( "hamburger".substring(4,8));
        System.out.println("----------------------------------------");
        String a = "aa bb cc dd";
        String[] strs = a.split(" ");
        for(int i = 0;i<strs.length;i++){
            System.out.println(strs[i]);
        }
        System.out.println("----------------------------------------");
//        String x = "abc";
//        String y = "def";
//        String newxy = x.concat(y);
//        System.out.println(newxy);
//        System.out.println( "abc".concat("xxx").concat("yyy").concat("zzz"));
    }
}
